package com.fsnbigdata.repository;


import com.fsnbigdata.domain.ZhHelp;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: chen quan zhou
 * @Date: Created in 16:41 2018/9/29
 * @Modified By:
 */
public interface ZhHelpRepository extends JpaRepository<ZhHelp,Long> {

    @Query(value = "select * from zh_help  where id=?1 and if(?2!='',creator=?2,1=1)",nativeQuery = true)
    ZhHelp findOneByCreator(Long id,String creator);

}
